﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate.Cfg;
using FluentNHibernate.Cfg.Db;
using NHibernate;
using NHibernate.Cfg;
using NHibernate.Tool.hbm2ddl;
using WhiteFox.DAlessio.Agenda.Domain.Model;
using FluentNHibernate.Mapping;

namespace WhiteFox.DAlessio.Agenda.Domain.Model.Mapping
{
    public class TelefoneMap : ClassMap<Telefone>
    {

        public TelefoneMap()
        {
            //Schema("Agenda");
            //Table("Telefone");
            Id(x => x.Id).GeneratedBy.Increment();
            Map(x => x.Numero);
            Map(x => x.Contato_Id)
                    .Column("Contato_id")
                    .Not.Nullable();
        }
    }
}
